#ifndef _APP_DATABASE_TEST
#define _APP_DATABASE_TEST



#include "ofMain.h"
#include "ofxOpenCv.h"
#include "cv.h"
#include "ofxDirList.h"
#include "abliefern/VanishingPoint.h"
#include "abliefern/Databaser.h"



class AppDatabaseTest : public ofBaseApp{
	
public:
	
	void setup();
	void update();
	void draw();
	
	void keyPressed  (int key);
	void keyReleased(int key);
	void mouseMoved(int x, int y );
	void mouseDragged(int x, int y, int button);
	void mousePressed(int x, int y, int button);
	void mouseReleased(int x, int y, int button);
	void resized(int w, int h);
	
	int filterLine(double theTheta);
	
	double modulus(double a, double b);

	
	//bool compareVP(abliefern::VanishingPoint* the1, abliefern::VanishingPoint* the2);
	
	
	
private:
		
	int _myDoSave;
	int _myDoFilter;
	ofImage _myGrabImage;
	
	/* Directory listing */
	int 		nImages;
	ofxDirList   DIR;
	

	int _myImageCounter;
	abliefern::Databaser _myDatabase;
	
	
};

#endif
